﻿using System;
using ChatCommon.Packets;
using NetBrick.Client;

namespace ChatClient.Handler
{
    internal class ChatPacketHandler : PacketHandler
    {
        public ChatPacketHandler(Client client)
            : base(client)
        {
        }

        public override void Process(Object packetData)
        {
            var chatPacket = (ChatPacket.Event) packetData;
            var username = chatPacket.Username;
            var message = chatPacket.Message;
            Log.LogMessage(ConsoleColor.Green, String.Format(" [Chat][{0}] ", username), message);
        }
    }
}